1. Field of Invention
The present invention relates to network devices that allow for data to be routed and moved in data communication or computer networks. The present invention further relates to high-speed network devices, such as network switches, routers, and repeaters. More specifically, the present invention is directed to methods and apparatuses that allow the speed of network traffic through the network device to be flexibly tuned with good granularity.
2. Description of Related Art
As computer performance has increased in recent years, the demands on data communication and computer networks has significantly increased; faster computer processors and higher memory capabilities need networks with high bandwidth capabilities to enable high speed transfer of significant amounts of data. In response to these changes, additional standards have been promulgated that allow for a greater throughput. The standards are important because network devices produced and supplied to implement and manage high speed data networks must use the same standards in order to transfer data between those network devices.
The 10 Gigabit Media Independent Interface (XGMII) is specified in the IEEE Draft P802.3ae (Ethernet standard specification for 10 Gigabit per second) to interface between IEEE 802.3 MAC entities and Physical Layer entities. The data bus width of XGMII is 32 bits (4 bytes) when applied on a double-edge clock or 64 bits (8 bytes) on a single-edge clock. The specification also discusses the value for the Inter-Packet Gap (IPG), where the IPG is the gap between two packets transmitted on an Ethernet network. The IPG value that is defined by the IEEE 802.3 standard is 12 bytes. However, the packet length is variable, so the last byte of the packet data can fall on any byte of a 4/8 byte bus. Moreover, the IEEE standard requires that the start frame delimiter must be placed at the location of byte 0. This has the effect that the IPG value cannot be fixed at a predefined value. Thus, the solution to fulfill the 12-byte IPG requirement by the IEEE 802.3 specification on the XGMII Interface is to have the IPG value vary in a range depending on the packet size, so that the average value will be proximate to the predefined value.
However, two issues arise when implementing the variation of the IPG value. First, a question arises as to how to smoothly shape each IPG value for any combination of packet sizes. One easy and common way to implement this requirement is to do it in a very approximate way. In other words, packets with a certain size or size range will have constant IPG values. An example of such a structure is illustrated in Table 1:
TABLE 1Packet size, multiples of:IPG8 * n + 115 bytes8 * n + 214 bytes8 * n + 313 bytes8 * n + 412 bytes8 * n + 511 bytes8 * n + 610 bytes8 * n + 7 9 bytes8 * n8 or 16 bytes
Specifically, packets with the size of a multiple of eight plus one (8*n+1), have the fixed IPG value of 15 bytes, etc. Therefore, if the packet size is evenly distributed in the range of (8*n) to (8*n+7) for a long period of time, then the average IPG value will become 12 bytes. However, packet sizes are not evenly distributed in many real applications. For instance, if most of packets have the size of 65 (8*n+1) bytes, then the average IPG will be approaching 15 bytes instead of 12 bytes. In order to solve this problem, a better way is needed to smooth out the IPG value to a predefined value for any combination of packet sizes.
Second, there is also the issue of how to make the IPG value programmable to have a finer granularity in terms the number of bytes in the IPG. A simple but widely employed way to program the value of IPG is to have a granularity of 4 bytes. However, some applications require finer, more flexible ways to program the IPG value, which is not fixed at the multiple of 4 bytes. One example of when this finer granularity is needed occurs when a XGMII device interfaces with fiber optic devices. The transfer speed of the compatible fiber optic device is actually a little slower than that of the XGMII device. An easy way to facilitate the traffic between these two unmatched-speed devices is to increase the value of IPG a little bit, such as 13 or 14 bytes, which requires a finer degree of granularity.
Another example illustrating the need for a finer granularity in the IPG occurs when the IPG needs to be smaller than 12 bytes and not be a multiple of four. Often, the 8-byte packet header (preamble and start frame delimiter) is replaced with some packet information, such as packet length, VLAN ID, service class, etc. It is possible that the replaced packet information is larger than 8 bytes and then IPG size will become less than 12 bytes to maintain the same traffic speed.
As such, there is a need for a method or mechanism in the prior art for a process and apparatus that can provide a programmable IPG with finer byte granularity.